import request from '@/utils/request'

// 查询客户政策列表
export function listPolicy(query) {
  return request({
    url: '/baseMain/policy/list',
    method: 'get',
    params: query
  })
}
export function mediumList(query) {
  return request({
    url: '/baseMain/policy/mediumList',
    method: 'get',
    params: query
  })
}

// 驳回
export function reject(id) {
  return request({
    url: '/baseMain/policy/reject/'+id,
    method: 'get',
  })
}

// 审批
export function approve(id) {
  return request({
    url: '/baseMain/policy/approve/'+id,
    method: 'get',
  })
}

// 查询客户政策列表
export function getListNoPages(query) {
  return request({
    url: '/baseMain/policy/getListNoPages',
    method: 'get',
    params: query
  })
}


// 查询客户政策详细
export function getPolicy(id) {
  return request({
    url: '/baseMain/policy/' + id,
    method: 'get'
  })
}

// 新增客户政策
export function addPolicy(data) {
  return request({
    url: '/baseMain/policy',
    method: 'post',
    data: data
  })
}

// 修改客户政策
export function updatePolicy(data) {
  return request({
    url: '/baseMain/policy',
    method: 'put',
    data: data
  })
}

// 删除客户政策
export function delPolicy(id) {
  return request({
    url: '/baseMain/policy/' + id,
    method: 'delete'
  })
}
